import request from '@/config/minRequest.js'
const url = '/customer'

//获取领取的券列表
export function favorableList(data) {
  return request.post(url + `/favorable_led/list`, data)
}

//获取已过期/领取的券列表
export function favorableLog(data) {
  return request.post(url + `/favorableLog/list`, data)
}

//领取自己得优惠券
export function getProviderFavorable(data) {
  return request.get(url + `/favorable_led/getProviderFavorable`,data)
}

// /favorable_led/info/{id}
export function favorableDetail(id) {
  return request.get(url + `/favorable_led/info/${id}`)
}

//转发
export function transfer(data) {
  return request.post(url + `/favorable_led/transfer`, data)
}

///favorable_led/getInfoByUniqueId/{uniqueId}
export function getInfoByUniqueId(uniqueId) {
  return request.get(url + `/favorable_led/getInfoByUniqueId/${uniqueId}`)
}

//优惠券-查询详情-根据活动唯一ID
export function getByActivityUniqueId(uniqueId) {
  return request.get(url + `/favorable_info/getByActivityUniqueId/${uniqueId}`)
}

//获取转发的券-v2.0
export function getTransfer(uniqueId) {
  return request.get(url + `/favorable_led/getTransfer/${uniqueId}`)
}

//优惠券活动-参与活动
export function joinActivity(data) {
  return request.post(url + `/favorableActivity/joinActivity`,data)
}

//查看自己分享的优惠券列表-v2.0
export function getTransferList(data) {
  return request.post(url + `/favorable_led/getTransferList`,data)
}

//核销优惠券-根据唯一ID-v2.0
export function cancelCouponByUniqueId(uniqueId) {
  return request.post(url + `/favorable_led/cancelCouponByUniqueId/${uniqueId}`)
}

//撤回优惠券-根据唯一ID-v2.0
export function cancelTransfer(uniqueId) {
  return request.post(url + `/favorable_led/cancelTransfer/${uniqueId}`)
}

//权益卡类型接口
export function equityCardTypeList(data) {
  return request.post(url + `/equityCardType/list`,data)
}

//权益卡活动接口
export function equityCardActivityTypeList(data) {
  return request.post(url + `/equityCardActivity/list`,data)
}

//创建权益卡活动接口
export function createEquityCardActivity(data) {
  return request.post(url + `/equityCardActivity/create`,data)
}

//优惠券活动-创建活动
export function createActivity(data) {
  return request.post(url + `/favorableActivity/createActivity`,data)
}

//权益卡活动 参加活动
export function cardReceive(data) {
  return request.post(url + `/equityCardActivity/joinActivity`,data)
}

//申请提现
export function applyWithdraw(data) {
  return request.post(url + `/popularize_info_salesman/applyWithdraw`,data)
}

//查询健康管家详情
export function getHealthManagerDetail(data) {
  return request.get(url + `/healthManager/getHealthManagerDetail`,data)
}